home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00008_corner subtable.ls < prev    next >
Encoding:
Text File  |  2000-01-18  |  908 b   |  38 lines

  1. property ancestor
  2.  
  3. on new me, tableName, castName, tableChannel, xLoc, vSlider, HSlider, descendant
  4.   if objectp(descendant) then
  5.     PassVar = descendant
  6.   else
  7.     PassVar = me
  8.   end if
  9.   ancestor = new(script("subtable object"), tableName, castName, tableChannel, xLoc, vSlider, HSlider, PassVar)
  10.   return me
  11. end
  12.  
  13. on trackMouse me
  14.   setThumb(me.pVSlider, 1)
  15.   setThumb(me.pHSlider, 1)
  16.   trackMouse(me.pSuperTable, point(0, 0))
  17.   return me
  18. end
  19.  
  20. on CalcCenterofRect me, xRect
  21.   if the machineType = 256 then
  22.     SpanHRect = GetSpanHeaderNewRect(me.pSuperTable)
  23.     l = getAt(xRect, 1)
  24.     t = getAt(xRect, 2)
  25.     R = getAt(xRect, 3)
  26.     b = getAt(xRect, 4)
  27.     xCenter = (R - l) / 2
  28.     if ((l mod 2) = 1) and ((R mod 2) = 1) then
  29.       xCenter = xCenter - 1
  30.     end if
  31.     yCenter = (b - t) / 2
  32.     xPoint = point(l + xCenter, t + yCenter)
  33.   else
  34.     xPoint = RectToLoc(xRect)
  35.   end if
  36.   return xPoint
  37. end
  38.